package com.project.systemfront.service.impl;

import com.project.systemfront.mapper.PhotographerProfileMapper;
import com.project.systemfront.pojo.PhotographerProfile;
import com.project.systemfront.pojo.vo.profileVo;
import com.project.systemfront.service.IPhotographerProfileService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * 摄影师档案Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-20
 */
@Service
public class PhotographerProfileServiceImpl implements IPhotographerProfileService
{
    @Autowired
    private PhotographerProfileMapper photographerProfileMapper;

    /**
     * 查询摄影师档案
     * 
     * @param id 摄影师档案主键
     * @return 摄影师档案
     */
    @Override
    public PhotographerProfile selectPhotographerProfileById(Long id)
    {
        return photographerProfileMapper.selectPhotographerProfileById(id);
    }

    /**
     * 查询摄影师档案列表
     *
     * @param photographerProfile 摄影师档案
     * @return 摄影师档案
     */
    @Override
    public List<profileVo> selectPhotographerProfileList(PhotographerProfile photographerProfile)
    {
        return photographerProfileMapper.selectPhotographerProfileList(photographerProfile);
    }

    /**
     * 新增摄影师档案
     * 
     * @param photographerProfile 摄影师档案
     * @return 结果
     */
    @Override
    public int insertPhotographerProfile(PhotographerProfile photographerProfile)
    {
        photographerProfile.setCreateTime(new Date());
        return photographerProfileMapper.insertPhotographerProfile(photographerProfile);
    }

    /**
     * 修改摄影师档案
     * 
     * @param photographerProfile 摄影师档案
     * @return 结果
     */
    @Override
    public int updatePhotographerProfile(PhotographerProfile photographerProfile)
    {
        photographerProfile.setUpdateTime(new Date());
        return photographerProfileMapper.updatePhotographerProfile(photographerProfile);
    }

    /**
     * 批量删除摄影师档案
     * 
     * @param ids 需要删除的摄影师档案主键
     * @return 结果
     */
    @Override
    public int deletePhotographerProfileByIds(Long[] ids)
    {
        return photographerProfileMapper.deletePhotographerProfileByIds(ids);
    }

    /**
     * 删除摄影师档案信息
     * 
     * @param id 摄影师档案主键
     * @return 结果
     */
    @Override
    public int deletePhotographerProfileById(Long id)
    {
        return photographerProfileMapper.deletePhotographerProfileById(id);
    }
}
